<template>
  <div>
    <div class="ui buttons mini">
      <button class="ui labeled icon button" @click="doAction({type: 'pre'})" v-if="sconfig.pre" :class="{disabled: sconfig.pre.disabled}">
        <i class="left chevron icon"></i>
        上一步
      </button>
      <button class="ui right labeled icon button" @click="doAction({type: 'next'})" v-if="sconfig.next" :class="{disabled: sconfig.next.disabled}">
        下一步
        <i class="right chevron icon"></i>
      </button>
    </div>
    &nbsp;
    <div class="ui buttons mini">
      <button class="ui secondary button" @click="doAction({type: 'save'})" v-if="sconfig.save" :class="{disabled: sconfig.save.disabled}">保存</button>
      <div class="or"></div>
      <button class="ui button" @click="doAction({type: 'cancel'})" v-if="sconfig.cancel">取消</button>
    </div>
  </div>
</template>
<script>
  import tool from 'src/util/tool'
  export default {
    data() {
      return {
        onStep: "",
        step : "",
      }
    },
    props:{
      sconfig:{
        type:Object,
        default(){
          return {}
        }
      }
    },
    watch:{
      sconfig:{
        immediate: true,
        handler(val) {
        }
      }
    },
    methods:{
      updateStatus(tabStatus){
        this.okStep = tabStatus;
      },
      doAction({type=""}){
        this.$emit("sclick", {type: type});
      }
    }
  }
</script>
<style scoped lang="less">
</style>
